package com.ruoyi.web.dto;

import com.ruoyi.framework.web.contants.AbnormalConstants;
import com.ruoyi.web.constant.RegexConstants;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * 用户注册
 *
 * @since 2023/3/21 14:54
 */
@Data
public class AppUserRegisterDTO {
    /**
     * 手机号
     */
    @NotEmpty(message = AbnormalConstants.MANDATORY_PARAM_EMPTY_OR_MALFORMED)
    @Pattern(regexp = RegexConstants.LOGIN_PHONE, message = AbnormalConstants.MANDATORY_PARAM_EMPTY_OR_MALFORMED)
    private String phone;

    /**
     * 密码
     */
    @NotEmpty(message = AbnormalConstants.MANDATORY_PARAM_EMPTY_OR_MALFORMED)
    @Pattern(regexp = RegexConstants.LOGIN_PASSWORD, message = AbnormalConstants.MANDATORY_PARAM_EMPTY_OR_MALFORMED)
    private String password;

    /**
     * 邀请码
     */
    @NotEmpty(message = AbnormalConstants.MANDATORY_PARAM_EMPTY_OR_MALFORMED)
    private String invitationCode;

    /**
     * 公链
     */
    private String chain;

    /**
     * 地址
     */
    private String address;
}
